package calculator;

import java.math.BigDecimal;

public class EikonaNumber {
	
	private BigDecimal number;
	
	
	public EikonaNumber(String x)
	{
		number = new BigDecimal(x);
	}
	
	private EikonaNumber(BigDecimal bd)
	{
		number = bd;
	}
	
	
	public BigDecimal getNumber()
	{
		return number;
	}
	
	public String toString()
	{
		return number.toPlainString();
	}
	
	
	
	public EikonaNumber add(EikonaNumber n2)
	{
		BigDecimal result = number.add(n2.getNumber());
		EikonaNumber sum = new EikonaNumber(result);
		return sum;
	}
	
	public EikonaNumber subtract(EikonaNumber n2)
	{
		BigDecimal result = number.subtract(n2.getNumber());
		EikonaNumber sum = new EikonaNumber(result);
		return sum;
	}
	
	public EikonaNumber multiply(EikonaNumber n2)
	{
		BigDecimal result = number.multiply(n2.getNumber());
		EikonaNumber sum = new EikonaNumber(result);
		return sum;
	}

	public EikonaNumber divide(EikonaNumber n2)
	{
		BigDecimal result = number.divide(n2.getNumber());
		EikonaNumber sum = new EikonaNumber(result);
		return sum;
	}
}
